<template>
  <div class="content-div">
    <div class="page-title">{{pageType == '1' ? '用户协议' : '隐私政策'}}</div>
    <div class="page-detail">{{pageType == '1' ? detail.user_agreement : detail.privacy_policy}}</div>
  </div>
</template>

<script>
import { getOfficeInstall } from '@/api/medical.js'
export default {
  name: 'index',
  data () {
    return {
      detail: {},
      pageType: ''
    }
  },
  created () {},
  methods: {
    getData () {
      getOfficeInstall().then(res => {
        if (res.data.errcode === 0) {
          this.detail = res.data.data
        }
      })
    }
  },
  mounted () {
    this.pageType = this.$route.query.pageType
    this.getData()
  }
}
</script>

<style scoped lang="less">
  .content-div{
    font-size: 12px;
    background-color: #F8F8F8;
    min-height: 100%;
    padding-top: 10px;
    box-sizing: border-box;
    .page-title{
      width: 100%;
      text-align: center;
      padding-bottom: 10px;
      font-weight: bold;
    }
    .page-detail{
      width: 300px;
      border-radius: 6px;
      margin-left: 10px;
      background-color: #FFFFFF;
      box-sizing: border-box;
      padding: 10px;
    }
  }
</style>
